package com.sky.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("category")
@ApiModel(description = "菜品分类实体类") // 描述类的作用
public class Category extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键", example = "1") // 描述字段作用及示例值
    private Long id;

    @ApiModelProperty(value = "类型: 1 菜品分类 2 套餐分类", example = "1") // 描述字段作用及示例值
    private Integer type;

    @ApiModelProperty(value = "分类名称", example = "热菜") // 描述字段作用及示例值
    private String name;

    @ApiModelProperty(value = "顺序", example = "5") // 描述字段作用及示例值
    private Integer sort;

    @ApiModelProperty(value = "分类状态: 0 禁用 1 启用", example = "1") // 描述字段作用及示例值
    private Integer status;
}
